package helpdesk;

/**
 * Used for converting a user's address to one compatible with a URL based
 * query.
 * 
 * @author brian
 */
public class MapsFormat
{
    public static String format(User userInfo)
    {
        StringBuffer address = new StringBuffer(userInfo.getAddress() + "+" + userInfo.getZip());

        for(int i = 0;i < address.length(); i++)
        {
            if (address.charAt(i) == ' ') address.setCharAt(i, '+');
        }
        
        return address.toString();
    }


}
